<template>
	<div>
		<!-- 模态框 -->
		<el-dialog :visible.sync="dialogVisible" width="60%">
			<div>
				<div align="center">
					<h2>库存明细单</h2>
				</div>
				<div>
					<el-form ref="form" id="form">
						<el-row>
							<el-col :span="10" :offset="1">
								<el-form-item label="产品编号：" label-width="110px">
									<span>{{fileNumber}}</span>
								</el-form-item>
							</el-col>
							<el-col :span="10" :offset="2">
								<el-form-item label="产品名称：" label-width="110px">
									<span>{{theProductName}}</span>
								</el-form-item>
							</el-col>
						</el-row>
						<el-row>
							<el-col :span="22" :offset="1">
								<template>
									<el-table :data="inventoryDetail" stripe style="width: 100%">
										<el-table-column prop="date" label="日期" width="180">
										</el-table-column>
										<el-table-column prop="name" label="姓名" width="180">
										</el-table-column>
										<el-table-column prop="address" label="地址">
										</el-table-column>
									</el-table>
								</template>
							</el-col>
						</el-row>
					</el-form>
				</div>
			</div>
		</el-dialog>
		<!-- 主题 -->
		<el-container>
			<el-header>
				<el-row>
					<el-col :span="24">
						<div class="reCheckProductSumClass">
							符合条件的产品档案总数 ：{{reCheckProductSum}}例
						</div>
					</el-col>
				</el-row>
			</el-header>
			<el-main style="height: 475px; overflow: hidden; background: white; border:1px solid white ; border-radius: 8px;">
				<div>
					<template>
						<el-table :data="tableData" stripe style="width: 100%">
							<el-table-column prop="date" label="日期" width="180">
							</el-table-column>
							<el-table-column prop="name" label="姓名" width="180">
							</el-table-column>
							<el-table-column prop="address" label="地址">
							</el-table-column>
							<el-table-column fixed="right" label="操作" width="180">
								<template slot-scope="scope">
									<el-button type="primary" size="mini" @click="dialogVisible=true">查看库存数量</el-button>
								</template>
							</el-table-column>
						</el-table>
					</template>	
					<template>
						<!--@size-change：当条数发现改变时触发-->
						<!--@current-change：当页码发生改变时触发-->
						<el-pagination style="margin-top: 5px;" layout="sizes, prev, pager, next, jumper, ->, total" :total="total"
						 :page-size.sync="pageSize" :page-sizes="pageSizes" :current-page.sync="currentPage" :pager-count="pagerCount"
						 background @size-change="handleSizeChange" @current-change="handleCurrentChange">
						</el-pagination>
					</template>
				</div>
			</el-main>
		</el-container>
	</div>
</template>

<script>
	export default {
		name: 'priceAdjustmentEnquiry',
		data() {
			return {
				/* 总条数 */
				reCheckProductSum: 4,
				/* table数据 */
				tableData: [{
					date: '2016-05-02',
					name: '王小虎',
					address: '上海市普陀区金沙江路 1518 弄'
				}, {
					date: '2016-05-04',
					name: '王小虎',
					address: '上海市普陀区金沙江路 1517 弄'
				}, {
					date: '2016-05-01',
					name: '王小虎',
					address: '上海市普陀区金沙江路 1519 弄'
				}, {
					date: '2016-05-03',
					name: '王小虎',
					address: '上海市普陀区金沙江路 1516 弄'
				}],
				/* 库存明细 */
				inventoryDetail:[],
				/* 分页 */
				total: 500, //总条数
				pageSize: 5, //每页显示多少条
				pageSizes: [2, 3, 5, 7], //每页显示条数候选值
				currentPage: 1, //当前页
				pagerCount: 5, //最多显示的页码，多余的会折叠
				/* 模态框显示 */
				dialogVisible: false,
				/* 档案编号 */
				fileNumber: '1',
				/* 产品名称 */
				theProductName: 'aa',
			}
		},
		methods: {
			/* 价格调整 */
			thePriceAdjustment() {
				this.dialogVisible = false;
			},
			/* 改变size[每页条数]调用方法*/
			handleSizeChange(size) {
				/* 只要改变马上调用分页查询 */
			},

			/* 改变page[当前页码]调用方法*/
			handleCurrentChange(page) {
				/* 只要改变马上调用分页查询 */
			},
		},
	}
</script>

<style scoped>
	#form .el-form-item {
		background-color: aliceblue;
	}

	/* 页面地址栏显示的背景设置 */
	.bg-9EA4D8 {
		color: #FFFFFF;
		background-color: #A4D1FF;
	}

	.el-header {
		line-height: 40px;
		background-color: #333333;
	}
	
	.reCheckProductSumClass {
		font-size: 13px;
	}

	.el-dialog__body {
		padding: 0;
	}
</style>
